<template>
  <el-dialog :visible.sync="visable" @close="handleCloseDialog" width="35%" append-to-body class="borderb_dia">
    <div slot="title" style="font-size: 14px;font-weight: 500;">
      选择标签
    </div>
    <div class="tag-card">
      <div class="card-head">
        <el-input class="search-input" size="small" placeholder="搜索标签/标签组" suffix-icon="el-icon-search" style="width: 200px;"/>
        <div class="search-tags">
          <el-switch size="mini" />
          仅显示已选中标签
        </div>
      </div>
      <div class="card-body">
        <div>
          <div class="label-title">可爱爱</div>
          <div class="label-list">
            <span class="label-tag active">可爱爱</span>
            <span class="label-tag">恶心心</span>
            <span class="label-tag">可呜呜</span>
          </div>
        </div>
        <div>
          <div class="label-title">可爱爱</div>
          <div class="label-list">
            <span class="label-tag">可爱爱</span>
            <span class="label-tag">恶心心</span>
            <span class="label-tag">可呜呜</span>
          </div>
        </div>
        <div>
          <div class="label-title">个人标签</div>
          <div class="label-list"></div>
        </div>
      </div>
    </div>
    <div slot="footer" class="dialog-footer">
      <el-button @click="handleCloseDialog">取 消</el-button>
      <el-button type="primary" @click="handleCloseDialog">确 定</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  data() {
    return {
      
    }
  },
  props: {
    visable: {
      type: Boolean,
      default: false,
    },
  },

  methods: {
    handleCloseDialog() {
      this.$emit('handCloseDialog');
    },
  },
};
</script>

<style scoped lang="scss">
.tag-card {
  border: 1px solid #e9e9e9;
  .card-head {
    display: flex;
    background-color: #f9f9f9;
    height: 44px;
    align-items: center;
    outline: 1px solid #e9e9e9;
    padding: 0 16px;
    justify-content: space-between;
    font-size: 14px;
    line-height: 22px;
  }
  .card-body {
    padding: 16px;
    max-height: 420px;
    overflow-y: auto;
    .label-title {
      display: inline-block;
      color: rgba(0, 0, 0, .45);
      font-size: 12px;
      margin-bottom: 8px;
    }
    .label-list {
      margin-bottom: 16px;
      .label-tag {
        display: inline-block;
        background: rgba(0, 0, 0, .04);
        border-radius: 2px;
        border: 1px solid rgba(0, 0, 0, .15);
        font-size: 12px;
        line-height: 20px;
        padding: 3px 8px;
        cursor: pointer;
        margin-right: 8px;
        margin-bottom: 8px;
        &:hover {
          color: #2f54eb;
        }
        &.active {
          color: #2f54eb;
          border-color: #2f54eb;
          background-color: #fff;
        }
      }
    }
  }
}
</style>
